$(function() {
    $("#tables").html(function() {
        $.ajax({
            type: "get",
            url: "http://47.98.122.157:9527/showList",
            data: "data",
            dataType: "json",
            success: function(res) {
                console.log(res);
                var data = res.data[0]
                console.log(data);
                var htmlStr = `
            <tbody>
                <tr>
                    <td>xxxx总数</td>
                    <td colspan="3">${data.total}</td>
                </tr>
                <tr>
                    <td>xxxxx</td>
                    <td colspan="3">${data.source}</td>
                </tr>
                <tr>
                    <td>xxxxx</td>
                    <td colspan="3">${data.age}</td>
                </tr>
                <tr>
                    <td>男性游客</td>
                    <td>${data.man}人</td>
                    <td>女性游客</td>
                    <td>${data.woman}人</td>
                </tr>
                <tr>
                    <td>团队游客</td>
                    <td>${data.ttourist}人</td>
                    <td>散客</td>
                    <td>${data.stourist}人</td>
                </tr>
                <tr>
                    <td>同比</td>
                    <td>${data.hb}</td>
                    <td>环比</td>
                    <td>${data.tb}</td>
                </tr>
            </tbody>
            `
                $("#tables").append(htmlStr)
            }
        });
    })
})